home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / xemacs.info-15.z / xemacs.info-15
Encoding:
GNU Info File  |  1998-05-21  |  49.7 KB  |  1,206 lines

  1. This is Info file ../../info/xemacs.info, produced by Makeinfo version
  2. 1.68 from the input file xemacs.texi.
  3.  
  4.    This file documents the XEmacs editor.
  5.  
  6.    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
  7. 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
  8. Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
  9.  
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.  
  14.    Permission is granted to copy and distribute modified versions of
  15. this manual under the conditions for verbatim copying, provided also
  16. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  17. General Public License" are included exactly as in the original, and
  18. provided that the entire resulting derived work is distributed under the
  19. terms of a permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "The GNU Manifesto",
  24. "Distribution" and "GNU General Public License" may be included in a
  25. translation approved by the author instead of in the original English.
  26.  
  27. 
  28. File: xemacs.info,  Node: Variables,  Next: Keyboard Macros,  Prev: Minor Modes,  Up: Customization
  29.  
  30. Variables
  31. =========
  32.  
  33.    A "variable" is a Lisp symbol which has a value.  Variable names can
  34. contain any characters, but by convention they are words separated by
  35. hyphens.  A variable can also have a documentation string, which
  36. describes what kind of value it should have and how the value will be
  37. used.
  38.  
  39.    Lisp allows any variable to have any kind of value, but most
  40. variables that Emacs uses require a value of a certain type.  Often the
  41. value has to be a string or a number.  Sometimes we say that a certain
  42. feature is turned on if a variable is "non-`nil'," meaning that if the
  43. variable's value is `nil', the feature is off, but the feature is on
  44. for any other value.  The conventional value to turn on the
  45. feature--since you have to pick one particular value when you set the
  46. variable--is `t'.
  47.  
  48.    Emacs uses many Lisp variables for internal recordkeeping, as any
  49. Lisp program must, but the most interesting variables for you are the
  50. ones that exist for the sake of customization.  Emacs does not
  51. (usually) change the values of these variables; instead, you set the
  52. values, and thereby alter and control the behavior of certain Emacs
  53. commands.  These variables are called "options".  Most options are
  54. documented in this manual and appear in the Variable Index (*note
  55. Variable Index::.).
  56.  
  57.    One example of a variable which is an option is `fill-column', which
  58. specifies the position of the right margin (as a number of characters
  59. from the left margin) to be used by the fill commands (*note
  60. Filling::.).
  61.  
  62. * Menu:
  63.  
  64. * Examining::           Examining or setting one variable's value.
  65. * Easy Customization::  Convenient and easy customization of variables.
  66. * Edit Options::        Examining or editing list of all variables' values.
  67. * Locals::              Per-buffer values of variables.
  68. * File Variables::      How files can specify variable values.
  69.  
  70. 
  71. File: xemacs.info,  Node: Examining,  Next: Easy Customization,  Up: Variables
  72.  
  73. Examining and Setting Variables
  74. -------------------------------
  75.  
  76. `C-h v'
  77. `M-x describe-variable'
  78.      Print the value and documentation of a variable.
  79.  
  80. `M-x set-variable'
  81.      Change the value of a variable.
  82.  
  83.    To examine the value of a single variable, use `C-h v'
  84. (`describe-variable'), which reads a variable name using the
  85. minibuffer, with completion.  It prints both the value and the
  86. documentation of the variable.
  87.  
  88.      C-h v fill-column <RET>
  89.  
  90. prints something like:
  91.  
  92.      fill-column's value is 75
  93.      
  94.      Documentation:
  95.      *Column beyond which automatic line-wrapping should happen.
  96.      Automatically becomes local when set in any fashion.
  97.  
  98. The star at the beginning of the documentation indicates that this
  99. variable is an option.  `C-h v' is not restricted to options; it allows
  100. any variable name.
  101.  
  102.    If you know which option you want to set, you can use `M-x
  103. set-variable' to set it.  This prompts for the variable name in the
  104. minibuffer (with completion), and then prompts for a Lisp expression
  105. for the new value using the minibuffer a second time.  For example,
  106.  
  107.      M-x set-variable <RET> fill-column <RET> 75 <RET>
  108.  
  109. sets `fill-column' to 75, as if you had executed the Lisp expression
  110. `(setq fill-column 75)'.
  111.  
  112.    Setting variables in this way, like all means of customizing Emacs
  113. except where explicitly stated, affects only the current Emacs session.
  114.  
  115. 
  116. File: xemacs.info,  Node: Easy Customization,  Next: Edit Options,  Prev: Examining,  Up: Variables
  117.  
  118. Easy Customization Interface
  119. ----------------------------
  120.  
  121.    A convenient way to find the user option variables that you want to
  122. change, and then change them, is with `M-x customize'.  This command
  123. creates a "customization buffer" with which you can browse through the
  124. Emacs user options in a logically organized structure, then edit and
  125. set their values.  You can also use the customization buffer to save
  126. settings permanently.  (Not all Emacs user options are included in this
  127. structure as of yet, but we are adding the rest.)
  128.  
  129. * Menu:
  130.  
  131. * Groups: Customization Groups.
  132.                              How options are classified in a structure.
  133. * Changing an Option::       How to edit a value and set an option.
  134. * Face Customization::       How to edit the attributes of a face.
  135. * Specific Customization::   Making a customization buffer for specific
  136.                                 options, faces, or groups.
  137.  
  138. 
  139. File: xemacs.info,  Node: Customization Groups,  Next: Changing an Option,  Up: Easy Customization
  140.  
  141. Customization Groups
  142. ....................
  143.  
  144.    For customization purposes, user options are organized into "groups"
  145. to help you find them.  Groups are collected into bigger groups, all
  146. the way up to a master group called `Emacs'.
  147.  
  148.    `M-x customize' creates a customization buffer that shows the
  149. top-level `Emacs' group and the second-level groups immediately under
  150. it.  It looks like this, in part:
  151.  
  152.      /- Emacs group: ---------------------------------------------------\
  153.            [State]: visible group members are all at standard settings.
  154.         Customization of the One True Editor.
  155.         See also [Manual].
  156.      
  157.       [Open] Editing group
  158.      Basic text editing facilities.
  159.      
  160.       [Open] External group
  161.      Interfacing to external utilities.
  162.      
  163.      MORE SECOND-LEVEL GROUPS
  164.      
  165.      \- Emacs group end ------------------------------------------------/
  166.  
  167. This says that the buffer displays the contents of the `Emacs' group.
  168. The other groups are listed because they are its contents.  But they
  169. are listed differently, without indentation and dashes, because *their*
  170. contents are not included.  Each group has a single-line documentation
  171. string; the `Emacs' group also has a `[State]' line.
  172.  
  173.    Most of the text in the customization buffer is read-only, but it
  174. typically includes some "editable fields" that you can edit.  There are
  175. also "active fields"; this means a field that does something when you
  176. "invoke" it.  To invoke an active field, either click on it with
  177. `Mouse-1', or move point to it and type <RET>.
  178.  
  179.    For example, the phrase `[Open]' that appears in a second-level
  180. group is an active field.  Invoking the `[Open]' field for a group
  181. opens up a new customization buffer, which shows that group and its
  182. contents.  This field is a kind of hypertext link to another group.
  183.  
  184.    The `Emacs' group does not include any user options itself, but
  185. other groups do.  By examining various groups, you will eventually find
  186. the options and faces that belong to the feature you are interested in
  187. customizing.  Then you can use the customization buffer to set them.
  188.  
  189.    You can view the structure of customization groups on a larger scale
  190. with `M-x customize-browse'.  This command creates a special kind of
  191. customization buffer which shows only the names of the groups (and
  192. options and faces), and their structure.
  193.  
  194.    In this buffer, you can show the contents of a group by invoking
  195. `[+]'.  When the group contents are visible, this button changes to
  196. `[-]'; invoking that hides the group contents.
  197.  
  198.    Each group, option or face name in this buffer has an active field
  199. which says `[Group]', `[Option]' or `[Face]'.  Invoking that active
  200. field creates an ordinary customization buffer showing just that group
  201. and its contents, just that option, or just that face.  This is the way
  202. to set values in it.
  203.  
  204. 
  205. File: xemacs.info,  Node: Changing an Option,  Next: Face Customization,  Prev: Customization Groups,  Up: Easy Customization
  206.  
  207. Changing an Option
  208. ..................
  209.  
  210.    Here is an example of what a user option looks like in the
  211. customization buffer:
  212.  
  213.      Kill Ring Max: [Hide] 30
  214.         [State]: this option is unchanged from its standard setting.
  215.      Maximum length of kill ring before oldest elements are thrown away.
  216.  
  217.    The text following `[Hide]', `30' in this case, indicates the
  218. current value of the option.  If you see `[Show]' instead of `[Hide]',
  219. it means that the value is hidden; the customization buffer initially
  220. hides values that take up several lines.  Invoke `[Show]' to show the
  221. value.
  222.  
  223.    The line after the option name indicates the "customization state"
  224. of the option: in the example above, it says you have not changed the
  225. option yet.  The word `[State]' at the beginning of this line is
  226. active; you can get a menu of various operations by invoking it with
  227. `Mouse-1' or <RET>.  These operations are essential for customizing the
  228. variable.
  229.  
  230.    The line after the `[State]' line displays the beginning of the
  231. option's documentation string.  If there are more lines of
  232. documentation, this line ends with `[More]'; invoke this to show the
  233. full documentation string.
  234.  
  235.    To enter a new value for `Kill Ring Max', move point to the value
  236. and edit it textually.  For example, you can type `M-d', then insert
  237. another number.
  238.  
  239.    When you begin to alter the text, you will see the `[State]' line
  240. change to say that you have edited the value:
  241.  
  242.      [State]: you have edited the value as text, but not set the option.
  243.  
  244.    Editing the value does not actually set the option variable.  To do
  245. that, you must "set" the option.  To do this, invoke the word `[State]'
  246. and choose `Set for Current Session'.
  247.  
  248.    The state of the option changes visibly when you set it:
  249.  
  250.      [State]: you have set this option, but not saved it for future sessions.
  251.  
  252.    You don't have to worry about specifying a value that is not valid;
  253. setting the option checks for validity and will not really install an
  254. unacceptable value.
  255.  
  256.    While editing a value or field that is a file name, directory name,
  257. command name, or anything else for which completion is defined, you can
  258. type `M-<TAB>' (`widget-complete') to do completion.
  259.  
  260.    Some options have a small fixed set of possible legitimate values.
  261. These options don't let you edit the value textually.  Instead, an
  262. active field `[Value Menu]' appears before the value; invoke this field
  263. to edit the value.  For a boolean "on or off" value, the active field
  264. says `[Toggle]', and it changes to the other value.  `[Value Menu]' and
  265. `[Toggle]' edit the buffer; the changes take effect when you use the
  266. `Set for Current Session' operation.
  267.  
  268.    Some options have values with complex structure.  For example, the
  269. value of `load-path' is a list of directories.  Here is how it appears
  270. in the customization buffer:
  271.  
  272.      Load Path:
  273.      [INS] [DEL] [Current dir?]: /usr/local/share/emacs/19.34.94/site-lisp
  274.      [INS] [DEL] [Current dir?]: /usr/local/share/emacs/site-lisp
  275.      [INS] [DEL] [Current dir?]: /usr/local/share/emacs/19.34.94/leim
  276.      [INS] [DEL] [Current dir?]: /usr/local/share/emacs/19.34.94/lisp
  277.      [INS] [DEL] [Current dir?]: /build/emacs/e19/lisp
  278.      [INS] [DEL] [Current dir?]: /build/emacs/e19/lisp/gnus
  279.      [INS]
  280.         [State]: this item has been changed outside the customization buffer.
  281.      List of directories to search for files to load....
  282.  
  283. Each directory in the list appears on a separate line, and each line has
  284. several editable or active fields.
  285.  
  286.    You can edit any of the directory names.  To delete a directory from
  287. the list, invoke `[DEL]' on that line.  To insert a new directory in
  288. the list, invoke `[INS]' at the point where you want to insert it.
  289.  
  290.    You can also invoke `[Current dir?]' to switch between including a
  291. specific named directory in the path, and including `nil' in the path.
  292. (`nil' in a search path means "try the current directory.")
  293.  
  294.    Two special commands, <TAB> and `S-<TAB>', are useful for moving
  295. through the customization buffer.  <TAB> (`widget-forward') moves
  296. forward to the next active or editable field; `S-<TAB>'
  297. (`widget-backward') moves backward to the previous active or editable
  298. field.
  299.  
  300.    Typing <RET> on an editable field also moves forward, just like
  301. <TAB>.  The reason for this is that people have a tendency to type
  302. <RET> when they are finished editing a field.  If you have occasion to
  303. insert a newline in an editable field, use `C-o' or `C-q C-j',
  304.  
  305.    Setting the option changes its value in the current Emacs session;
  306. "saving" the value changes it for future sessions as well.  This works
  307. by writing code into your `~/.emacs' file so as to set the option
  308. variable again each time you start Emacs.  To save the option, invoke
  309. `[State]' and select the `Save for Future Sessions' operation.
  310.  
  311.    You can also restore the option to its standard value by invoking
  312. `[State]' and selecting the `Reset' operation.  There are actually
  313. three reset operations:
  314.  
  315. `Reset to Current'
  316.      If you have made some modifications and not yet set the option,
  317.      this restores the text in the customization buffer to match the
  318.      actual value.
  319.  
  320. `Reset to Saved'
  321.      This restores the value of the option to the last saved value, and
  322.      updates the text accordingly.
  323.  
  324. `Reset to Standard Settings'
  325.      This sets the option to its standard value, and updates the text
  326.      accordingly.  This also eliminates any saved value for the option,
  327.      so that you will get the standard value in future Emacs sessions.
  328.  
  329.    The state of a group indicates whether anything in that group has
  330. been edited, set or saved.  You can select `Set for Current Session',
  331. `Save for Future Sessions' and the various kinds of `Reset' operation
  332. for the group; these operations on the group apply to all options in
  333. the group and its subgroups.
  334.  
  335.    Near the top of the customization buffer there are two lines
  336. containing several active fields:
  337.  
  338.       [Set] [Save] [Reset]  [Done]
  339.  
  340. Invoking `[Done]' buries this customization buffer.  Each of the other
  341. fields performs an operation--set, save or reset--on each of the items
  342. in the buffer that could meaningfully be set, saved or reset.
  343.  
  344. 
  345. File: xemacs.info,  Node: Face Customization,  Next: Specific Customization,  Prev: Changing an Option,  Up: Easy Customization
  346.  
  347. Customizing Faces
  348. .................
  349.  
  350.    In addition to user options, some customization groups also include
  351. faces.  When you show the contents of a group, both the user options and
  352. the faces in the group appear in the customization buffer.  Here is an
  353. example of how a face looks:
  354.  
  355.      Custom Changed Face: (sample)
  356.         [State]: this face is unchanged from its standard setting.
  357.      Face used when the customize item has been changed.
  358.      Parent groups: [Custom Magic Faces]
  359.      Attributes: [ ] Bold: [Toggle]  off (nil)
  360.                  [ ] Italic: [Toggle]  off (nil)
  361.                  [ ] Underline: [Toggle]  off (nil)
  362.                  [ ] Foreground: white       (sample)
  363.                  [ ] Background: blue        (sample)
  364.                  [ ] Inverse: [Toggle]  off (nil)
  365.                  [ ] Stipple:
  366.                  [ ] Font Family:
  367.                  [ ] Size:
  368.                  [ ] Strikethru: off
  369.  
  370.    Each face attribute has its own line.  The `[X]' field before the
  371. attribute name indicates whether the attribute is "enabled"; `X' means
  372. that it is.  You can enable or disable the attribute by invoking that
  373. field.  When the attribute is enabled, you can change the attribute
  374. value in the usual ways.
  375.  
  376.    Setting, saving and resetting a face work like the same operations
  377. for options (*note Changing an Option::.).
  378.  
  379.    A face can specify different appearances for different types of
  380. display.  For example, a face can make text red on a color display, but
  381. use a bold font on a monochrome display.  To specify multiple
  382. appearances for a face, select `Show Display Types' in the menu you get
  383. from invoking `[State]'.
  384.  
  385. 
  386. File: xemacs.info,  Node: Specific Customization,  Prev: Face Customization,  Up: Easy Customization
  387.  
  388. Customizing Specific Items
  389. ..........................
  390.  
  391.    Instead of finding the options you want to change by moving down
  392. through the structure of groups, you can specify the particular option,
  393. face or group that you want to customize.
  394.  
  395. `M-x customize-option <RET> OPTION <RET>'
  396.      Set up a customization buffer with just one option, OPTION.
  397.  
  398. `M-x customize-face <RET> FACE <RET>'
  399.      Set up a customization buffer with just one face, FACE.
  400.  
  401. `M-x customize-group <RET> GROUP <RET>'
  402.      Set up a customization buffer with just one group, GROUP.
  403.  
  404. `M-x customize-apropos <RET> REGEXP <RET>'
  405.      Set up a customization buffer with all the options, faces and
  406.      groups that match REGEXP.
  407.  
  408. `M-x customize-saved'
  409.      Set up a customization buffer containing all options and faces
  410.      that you have saved with customization buffers.
  411.  
  412. `M-x customize-customized'
  413.      Set up a customization buffer containing all options and faces
  414.      that you have customized but not saved.
  415.  
  416.    If you want to alter a particular user option variable with the
  417. customization buffer, and you know its name, you can use the command
  418. `M-x customize-option' and specify the option name.  This sets up the
  419. customization buffer with just one option--the one that you asked for.
  420. Editing, setting and saving the value work as described above, but only
  421. for the specified option.
  422.  
  423.    Likewise, you can modify a specific face, chosen by name, using `M-x
  424. customize-face'.
  425.  
  426.    You can also set up the customization buffer with a specific group,
  427. using `M-x customize-group'.  The immediate contents of the chosen
  428. group, including option variables, faces, and other groups, all appear
  429. as well.  However, these subgroups' own contents start out hidden.  You
  430. can show their contents in the usual way, by invoking `[Show]'.
  431.  
  432.    To control more precisely what to customize, you can use `M-x
  433. customize-apropos'.  You specify a regular expression as argument; then
  434. all options, faces and groups whose names match this regular expression
  435. are set up in the customization buffer.  If you specify an empty regular
  436. expression, this includes *all* groups, options and faces in the
  437. customization buffer (but that takes a long time).
  438.  
  439.    If you change option values and then decide the change was a mistake,
  440. you can use two special commands to revisit your previous changes.  Use
  441. `customize-saved' to look at the options and faces that you have saved.
  442. Use `M-x customize-customized' to look at the options and faces that
  443. you have set but not saved.
  444.  
  445. 
  446. File: xemacs.info,  Node: Edit Options,  Next: Locals,  Prev: Easy Customization,  Up: Variables
  447.  
  448. Editing Variable Values
  449. -----------------------
  450.  
  451. `M-x list-options'
  452.      Display a buffer listing names, values, and documentation of all
  453.      options.
  454.  
  455. `M-x edit-options'
  456.      Change option values by editing a list of options.
  457.  
  458.    `M-x list-options' displays a list of all Emacs option variables in
  459. an Emacs buffer named `*List Options*'.  Each option is shown with its
  460. documentation and its current value.  Here is what a portion of it might
  461. look like:
  462.  
  463.      ;; exec-path:
  464.      ("." "/usr/local/bin" "/usr/ucb" "/bin" "/usr/bin" "/u2/emacs/etc")
  465.      *List of directories to search programs to run in subprocesses.
  466.      Each element is a string (directory name)
  467.      or nil (try the default directory).
  468.      ;;
  469.      ;; fill-column:
  470.      75
  471.      *Column beyond which automatic line-wrapping should happen.
  472.      Automatically becomes local when set in any fashion.
  473.      ;;
  474.  
  475.    `M-x edit-options' goes one step further and immediately selects the
  476. `*List Options*' buffer; this buffer uses the major mode Options mode,
  477. which provides commands that allow you to point at an option and change
  478. its value:
  479.  
  480. `s'
  481.      Set the variable point is in or near to a new value read using the
  482.      minibuffer.
  483.  
  484. `x'
  485.      Toggle the variable point is in or near: if the value was `nil',
  486.      it becomes `t'; otherwise it becomes `nil'.
  487.  
  488. `1'
  489.      Set the variable point is in or near to `t'.
  490.  
  491. `0'
  492.      Set the variable point is in or near to `nil'.
  493.  
  494. `n'
  495. `p'
  496.      Move to the next or previous variable.
  497.  
  498. 
  499. File: xemacs.info,  Node: Locals,  Next: File Variables,  Prev: Edit Options,  Up: Variables
  500.  
  501. Local Variables
  502. ---------------
  503.  
  504. `M-x make-local-variable'
  505.      Make a variable have a local value in the current buffer.
  506.  
  507. `M-x kill-local-variable'
  508.      Make a variable use its global value in the current buffer.
  509.  
  510. `M-x make-variable-buffer-local'
  511.      Mark a variable so that setting it will make it local to the
  512.      buffer that is current at that time.
  513.  
  514.    You can make any variable "local" to a specific Emacs buffer.  This
  515. means that the variable's value in that buffer is independent of its
  516. value in other buffers.  A few variables are always local in every
  517. buffer.  All other Emacs variables have a "global" value which is in
  518. effect in all buffers that have not made the variable local.
  519.  
  520.    Major modes always make the variables they set local to the buffer.
  521. This is why changing major modes in one buffer has no effect on other
  522. buffers.
  523.  
  524.    `M-x make-local-variable' reads the name of a variable and makes it
  525. local to the current buffer.  Further changes in this buffer will not
  526. affect others, and changes in the global value will not affect this
  527. buffer.
  528.  
  529.    `M-x make-variable-buffer-local' reads the name of a variable and
  530. changes the future behavior of the variable so that it automatically
  531. becomes local when it is set.  More precisely, once you have marked a
  532. variable in this way, the usual ways of setting the variable will
  533. automatically invoke `make-local-variable' first.  We call such
  534. variables "per-buffer" variables.
  535.  
  536.    Some important variables have been marked per-buffer already.  They
  537. include `abbrev-mode', `auto-fill-function', `case-fold-search',
  538. `comment-column', `ctl-arrow', `fill-column', `fill-prefix',
  539. `indent-tabs-mode', `left-margin',
  540. `mode-line-format', `overwrite-mode', `selective-display-ellipses',
  541. `selective-display', `tab-width', and `truncate-lines'.  Some other
  542. variables are always local in every buffer, but they are used for
  543. internal purposes.
  544.  
  545.    Note: the variable `auto-fill-function' was formerly named
  546. `auto-fill-hook'.
  547.  
  548.    If you want a variable to cease to be local to the current buffer,
  549. call `M-x kill-local-variable' and provide the name of a variable to
  550. the prompt.  The global value of the variable is again in effect in
  551. this buffer.  Setting the major mode kills all the local variables of
  552. the buffer.
  553.  
  554.    To set the global value of a variable, regardless of whether the
  555. variable has a local value in the current buffer, you can use the Lisp
  556. function `setq-default'.  It works like `setq'.  If there is a local
  557. value in the current buffer, the local value is not affected by
  558. `setq-default'; thus, the new global value may not be visible until you
  559. switch to another buffer, as in the case of:
  560.  
  561.      (setq-default fill-column 75)
  562.  
  563. `setq-default' is the only way to set the global value of a variable
  564. that has been marked with `make-variable-buffer-local'.
  565.  
  566.    Programs can look at a variable's default value with `default-value'.
  567. This function takes a symbol as an argument and returns its default
  568. value.  The argument is evaluated; usually you must quote it
  569. explicitly, as in the case of:
  570.  
  571.      (default-value 'fill-column)
  572.  
  573. 
  574. File: xemacs.info,  Node: File Variables,  Prev: Locals,  Up: Variables
  575.  
  576. Local Variables in Files
  577. ------------------------
  578.  
  579.    A file can contain a "local variables list", which specifies the
  580. values to use for certain Emacs variables when that file is edited.
  581. Visiting the file checks for a local variables list and makes each
  582. variable in the list local to the buffer in which the file is visited,
  583. with the value specified in the file.
  584.  
  585.    A local variables list goes near the end of the file, in the last
  586. page.  (It is often best to put it on a page by itself.)  The local
  587. variables list starts with a line containing the string `Local
  588. Variables:', and ends with a line containing the string `End:'.  In
  589. between come the variable names and values, one set per line, as
  590. `VARIABLE: VALUE'.  The VALUEs are not evaluated; they are used
  591. literally.
  592.  
  593.    The line which starts the local variables list does not have to say
  594. just `Local Variables:'.  If there is other text before `Local
  595. Variables:', that text is called the "prefix", and if there is other
  596. text after, that is called the "suffix".  If a prefix or suffix are
  597. present, each entry in the local variables list should have the prefix
  598. before it and the suffix after it.  This includes the `End:' line.  The
  599. prefix and suffix are included to disguise the local variables list as
  600. a comment so the compiler or text formatter  will ignore it.  If you do
  601. not need to disguise the local variables list as a comment in this way,
  602. there is no need to include a prefix or a suffix.
  603.  
  604.    Two "variable" names are special in a local variables list: a value
  605. for the variable `mode' sets the major mode, and a value for the
  606. variable `eval' is simply evaluated as an expression and the value is
  607. ignored.  These are not real variables; setting them in any other
  608. context does not have the same effect.  If `mode' is used in a local
  609. variables list, it should be the first entry in the list.
  610.  
  611.    Here is an example of a local variables list:
  612.      ;;; Local Variables: ***
  613.      ;;; mode:lisp ***
  614.      ;;; comment-column:0 ***
  615.      ;;; comment-start: ";;; "  ***
  616.      ;;; comment-end:"***" ***
  617.      ;;; End: ***
  618.  
  619.    Note that the prefix is `;;; ' and the suffix is ` ***'.  Note also
  620. that comments in the file begin with and end with the same strings.
  621. Presumably the file contains code in a language which is enough like
  622. Lisp for Lisp mode to be useful but in which comments start and end
  623. differently.  The prefix and suffix are used in the local variables
  624. list to make the list look like several lines of comments when the
  625. compiler or interpreter for that language reads the file.
  626.  
  627.    The start of the local variables list must be no more than 3000
  628. characters from the end of the file, and must be in the last page if the
  629. file is divided into pages.  Otherwise, Emacs will not notice it is
  630. there.  The purpose is twofold: a stray `Local Variables:' not in the
  631. last page does not confuse Emacs, and Emacs never needs to search a
  632. long file that contains no page markers and has no local variables list.
  633.  
  634.    You may be tempted to turn on Auto Fill mode with a local variable
  635. list.  That is inappropriate.  Whether you use Auto Fill mode or not is
  636. a matter of personal taste, not a matter of the contents of particular
  637. files.  If you want to use Auto Fill, set up major mode hooks with your
  638. `.emacs' file to turn it on (when appropriate) for you alone (*note
  639. Init File::.).  Don't try to use a local variable list that would
  640. impose your taste on everyone working with the file.
  641.  
  642.    XEmacs allows you to specify local variables in the first line of a
  643. file, in addition to specifying them in the `Local Variables' section
  644. at the end of a file.
  645.  
  646.    If the first line of a file contains two occurrences of ``-*-'',
  647. XEmacs uses the information between them to determine what the major
  648. mode and variable settings should be.  For example, these are all legal:
  649.  
  650.          ;;; -*- mode: emacs-lisp -*-
  651.          ;;; -*- mode: postscript; version-control: never -*-
  652.          ;;; -*- tags-file-name: "/foo/bar/TAGS" -*-
  653.  
  654.    For historical reasons, the syntax ``-*- modename -*-'' is allowed
  655. as well; for example, you can use:
  656.  
  657.          ;;; -*- emacs-lisp -*-
  658.  
  659.    The variable `enable-local-variables' controls the use of local
  660. variables lists in files you visit.  The value can be `t', `nil', or
  661. something else.  A value of `t' means local variables lists are obeyed;
  662. `nil' means they are ignored; anything else means query.
  663.  
  664.    The command `M-x normal-mode' always obeys local variables lists and
  665. ignores this variable.
  666.  
  667. 
  668. File: xemacs.info,  Node: Keyboard Macros,  Next: Key Bindings,  Prev: Variables,  Up: Customization
  669.  
  670. Keyboard Macros
  671. ===============
  672.  
  673.    A "keyboard macro" is a command defined by the user to abbreviate a
  674. sequence of keys.  For example, if you discover that you are about to
  675. type `C-n C-d' forty times, you can speed your work by defining a
  676. keyboard macro to invoke `C-n C-d' and calling it with a repeat count
  677. of forty.
  678.  
  679. `C-x ('
  680.      Start defining a keyboard macro (`start-kbd-macro').
  681.  
  682. `C-x )'
  683.      End the definition of a keyboard macro (`end-kbd-macro').
  684.  
  685. `C-x e'
  686.      Execute the most recent keyboard macro (`call-last-kbd-macro').
  687.  
  688. `C-u C-x ('
  689.      Re-execute last keyboard macro, then add more keys to its
  690.      definition.
  691.  
  692. `C-x q'
  693.      When this point is reached during macro execution, ask for
  694.      confirmation (`kbd-macro-query').
  695.  
  696. `M-x name-last-kbd-macro'
  697.      Give a command name (for the duration of the session) to the most
  698.      recently defined keyboard macro.
  699.  
  700. `M-x insert-kbd-macro'
  701.      Insert in the buffer a keyboard macro's definition, as Lisp code.
  702.  
  703.    Keyboard macros differ from other Emacs commands in that they are
  704. written in the Emacs command language rather than in Lisp.  This makes
  705. it easier for the novice to write them and makes them more convenient as
  706. temporary hacks.  However, the Emacs command language is not powerful
  707. enough as a programming language to be useful for writing anything
  708. general or complex.  For such things, Lisp must be used.
  709.  
  710.    You define a keyboard macro by executing the commands which are its
  711. definition.  Put differently, as you are defining a keyboard macro, the
  712. definition is being executed for the first time.  This way, you see
  713. what the effects of your commands are, and don't have to figure them
  714. out in your head.  When you are finished, the keyboard macro is defined
  715. and also has been executed once.  You can then execute the same set of
  716. commands again by invoking the macro.
  717.  
  718. * Menu:
  719.  
  720. * Basic Kbd Macro::     Defining and running keyboard macros.
  721. * Save Kbd Macro::      Giving keyboard macros names; saving them in files.
  722. * Kbd Macro Query::     Keyboard macros that do different things each use.
  723.  
  724. 
  725. File: xemacs.info,  Node: Basic Kbd Macro,  Next: Save Kbd Macro,  Up: Keyboard Macros
  726.  
  727. Basic Use
  728. ---------
  729.  
  730.    To start defining a keyboard macro, type `C-x ('
  731. (`start-kbd-macro').  From then on, anything you type continues to be
  732. executed, but also becomes part of the definition of the macro.  `Def'
  733. appears in the mode line to remind you of what is going on.  When you
  734. are finished, the `C-x )' command (`end-kbd-macro') terminates the
  735. definition, without becoming part of it.
  736.  
  737.    For example,
  738.  
  739.      C-x ( M-f foo C-x )
  740.  
  741. defines a macro to move forward a word and then insert `foo'.
  742.  
  743.    You can give `C-x )' a repeat count as an argument, in which case it
  744. repeats the macro that many times right after defining it, but defining
  745. the macro counts as the first repetition (since it is executed as you
  746. define it).  If you give `C-x )' an argument of 4, it executes the
  747. macro immediately 3 additional times.  An argument of zero to `C-x e'
  748. or `C-x )' means repeat the macro indefinitely (until it gets an error
  749. or you type `C-g').
  750.  
  751.    Once you have defined a macro, you can invoke it again with the `C-x
  752. e' command (`call-last-kbd-macro').  You can give the command a repeat
  753. count numeric argument to execute the macro many times.
  754.  
  755.    To repeat an operation at regularly spaced places in the text,
  756. define a macro and include as part of the macro the commands to move to
  757. the next place you want to use it.  For example, if you want to change
  758. each line, you should position point at the start of a line, and define
  759. a macro to change that line and leave point at the start of the next
  760. line.  Repeating the macro will then operate on successive lines.
  761.  
  762.    After you have terminated the definition of a keyboard macro, you
  763. can add to the end of its definition by typing `C-u C-x ('.  This is
  764. equivalent to plain `C-x (' followed by retyping the whole definition
  765. so far.  As a consequence it re-executes the macro as previously
  766. defined.
  767.  
  768. 
  769. File: xemacs.info,  Node: Save Kbd Macro,  Next: Kbd Macro Query,  Prev: Basic Kbd Macro,  Up: Keyboard Macros
  770.  
  771. Naming and Saving Keyboard Macros
  772. ---------------------------------
  773.  
  774.    To save a keyboard macro for longer than until you define the next
  775. one, you must give it a name using `M-x name-last-kbd-macro'.  This
  776. reads a name as an argument using the minibuffer and defines that name
  777. to execute the macro.  The macro name is a Lisp symbol, and defining it
  778. in this way makes it a valid command name for calling with `M-x' or for
  779. binding a key to with `global-set-key' (*note Keymaps::.).  If you
  780. specify a name that has a prior definition other than another keyboard
  781. macro, Emacs prints an error message and nothing is changed.
  782.  
  783.    Once a macro has a command name, you can save its definition in a
  784. file.  You can then use it in another editing session.  First visit the
  785. file you want to save the definition in.  Then use the command:
  786.  
  787.      M-x insert-kbd-macro <RET> MACRONAME <RET>
  788.  
  789. This inserts some Lisp code that, when executed later, will define the
  790. same macro with the same definition it has now.  You need not
  791. understand Lisp code to do this, because `insert-kbd-macro' writes the
  792. Lisp code for you.  Then save the file.  You can load the file with
  793. `load-file' (*note Lisp Libraries::.).  If the file you save in is your
  794. initialization file `~/.emacs' (*note Init File::.), then the macro
  795. will be defined each time you run Emacs.
  796.  
  797.    If you give `insert-kbd-macro' a prefix argument, it creates
  798. additional Lisp code to record the keys (if any) that you have bound to
  799. the keyboard macro, so that the macro is reassigned the same keys when
  800. you load the file.
  801.  
  802. 
  803. File: xemacs.info,  Node: Kbd Macro Query,  Prev: Save Kbd Macro,  Up: Keyboard Macros
  804.  
  805. Executing Macros With Variations
  806. --------------------------------
  807.  
  808.    You can use `C-x q' (`kbd-macro-query'), to get an effect similar to
  809. that of `query-replace'.  The macro asks you  each time whether to make
  810. a change.  When you are defining the macro, type `C-x q' at the point
  811. where you want the query to occur.  During macro definition, the `C-x
  812. q' does nothing, but when you invoke the macro, `C-x q' reads a
  813. character from the terminal to decide whether to continue.
  814.  
  815.    The special answers to a `C-x q' query are <SPC>, <DEL>, `C-d',
  816. `C-l', and `C-r'.  Any other character terminates execution of the
  817. keyboard macro and is then read as a command.  <SPC> means to continue.
  818. <DEL> means to skip the remainder of this repetition of the macro,
  819. starting again from the beginning in the next repetition.  `C-d' means
  820. to skip the remainder of this repetition and cancel further repetition.
  821. `C-l' redraws the frame and asks you again for a character to specify
  822. what to do.  `C-r' enters a recursive editing level, in which you can
  823. perform editing that is not part of the macro.  When you exit the
  824. recursive edit using `C-M-c', you are asked again how to continue with
  825. the keyboard macro.  If you type a <SPC> at this time, the rest of the
  826. macro definition is executed.  It is up to you to leave point and the
  827. text in a state such that the rest of the macro will do what you want.
  828.  
  829.    `C-u C-x q', which is `C-x q' with a numeric argument, performs a
  830. different function.  It enters a recursive edit reading input from the
  831. keyboard, both when you type it during the definition of the macro and
  832. when it is executed from the macro.  During definition, the editing you
  833. do inside the recursive edit does not become part of the macro.  During
  834. macro execution, the recursive edit gives you a chance to do some
  835. particularized editing.  *Note Recursive Edit::.
  836.  
  837. 
  838. File: xemacs.info,  Node: Key Bindings,  Next: Syntax,  Prev: Keyboard Macros,  Up: Customization
  839.  
  840. Customizing Key Bindings
  841. ========================
  842.  
  843.    This section deals with the "keymaps" that define the bindings
  844. between keys and functions, and shows how you can customize these
  845. bindings.
  846.  
  847.    A command is a Lisp function whose definition provides for
  848. interactive use.  Like every Lisp function, a command has a function
  849. name, which is a Lisp symbol whose name usually consists of lower case
  850. letters and hyphens.
  851.  
  852. * Menu:
  853.  
  854. * Keymaps::    Definition of the keymap data structure.
  855.                Names of Emacs's standard keymaps.
  856. * Rebinding::  How to redefine one key's meaning conveniently.
  857. * Disabling::  Disabling a command means confirmation is required
  858.                 before it can be executed.  This is done to protect
  859.                 beginners from surprises.
  860.  
  861. 
  862. File: xemacs.info,  Node: Keymaps,  Next: Rebinding,  Up: Key Bindings
  863.  
  864. Keymaps
  865. -------
  866.  
  867.    The bindings between characters and command functions are recorded in
  868. data structures called "keymaps".  Emacs has many of these.  One, the
  869. "global" keymap, defines the meanings of the single-character keys that
  870. are defined regardless of major mode.  It is the value of the variable
  871. `global-map'.
  872.  
  873.    Each major mode has another keymap, its "local keymap", which
  874. contains overriding definitions for the single-character keys that are
  875. redefined in that mode.  Each buffer records which local keymap is
  876. installed for it at any time, and the current buffer's local keymap is
  877. the only one that directly affects command execution.  The local keymaps
  878. for Lisp mode, C mode, and many other major modes always exist even when
  879. not in use.  They are the values of the variables `lisp-mode-map',
  880. `c-mode-map', and so on.  For less frequently used major modes, the
  881. local keymap is sometimes constructed only when the mode is used for the
  882. first time in a session, to save space.
  883.  
  884.    There are local keymaps for the minibuffer, too; they contain various
  885. completion and exit commands.
  886.  
  887.    * `minibuffer-local-map' is used for ordinary input (no completion).
  888.  
  889.    * `minibuffer-local-ns-map' is similar, except that <SPC> exits just
  890.      like <RET>.  This is used mainly for Mocklisp compatibility.
  891.  
  892.    * `minibuffer-local-completion-map' is for permissive completion.
  893.  
  894.    * `minibuffer-local-must-match-map' is for strict completion and for
  895.      cautious completion.
  896.  
  897.    * `repeat-complex-command-map' is for use in `C-x <ESC>'.
  898.  
  899.    * `isearch-mode-map' contains the bindings of the special keys which
  900.      are bound in the pseudo-mode entered with `C-s' and `C-r'.
  901.  
  902.    Finally, each prefix key has a keymap which defines the key sequences
  903. that start with it.  For example, `ctl-x-map' is the keymap used for
  904. characters following a `C-x'.
  905.  
  906.    * `ctl-x-map' is the variable name for the map used for characters
  907.      that follow `C-x'.
  908.  
  909.    * `help-map' is used for characters that follow `C-h'.
  910.  
  911.    * `esc-map' is for characters that follow <ESC>. All Meta characters
  912.      are actually defined by this map.
  913.  
  914.    * `ctl-x-4-map' is for characters that follow `C-x 4'.
  915.  
  916.    * `mode-specific-map' is for characters that follow `C-c'.
  917.  
  918.    The definition of a prefix key is the keymap to use for looking up
  919. the following character.  Sometimes the definition is actually a Lisp
  920. symbol whose function definition is the following character keymap.  The
  921. effect is the same, but it provides a command name for the prefix key
  922. that you can use as a description of what the prefix key is for.  Thus
  923. the binding of `C-x' is the symbol `Ctl-X-Prefix', whose function
  924. definition is the keymap for `C-x' commands, the value of `ctl-x-map'.
  925.  
  926.    Prefix key definitions can appear in either the global map or a
  927. local map.  The definitions of `C-c', `C-x', `C-h', and <ESC> as prefix
  928. keys appear in the global map, so these prefix keys are always
  929. available.  Major modes can locally redefine a key as a prefix by
  930. putting a prefix key definition for it in the local map.
  931.  
  932.    A mode can also put a prefix definition of a global prefix character
  933. such as `C-x' into its local map.  This is how major modes override the
  934. definitions of certain keys that start with `C-x'.  This case is
  935. special, because the local definition does not entirely replace the
  936. global one.  When both the global and local definitions of a key are
  937. other keymaps, the next character is looked up in both keymaps, with
  938. the local definition overriding the global one.  The character after the
  939. `C-x' is looked up in both the major mode's own keymap for redefined
  940. `C-x' commands and in `ctl-x-map'.  If the major mode's own keymap for
  941. `C-x' commands contains `nil', the definition from the global keymap
  942. for `C-x' commands is used.
  943.  
  944. 
  945. File: xemacs.info,  Node: Rebinding,  Next: Disabling,  Prev: Keymaps,  Up: Key Bindings
  946.  
  947. Changing Key Bindings
  948. ---------------------
  949.  
  950.    You can redefine an Emacs key by changing its entry in a keymap.
  951. You can change the global keymap, in which case the change is effective
  952. in all major modes except those that have their own overriding local
  953. definitions for the same key.  Or you can change the current buffer's
  954. local map, which affects all buffers using the same major mode.
  955.  
  956. * Menu:
  957.  
  958. * Interactive Rebinding::     Changing Key Bindings Interactively
  959. * Programmatic Rebinding::    Changing Key Bindings Programmatically
  960. * Key Bindings Using Strings::Using Strings for Changing Key Bindings
  961.  
  962. 
  963. File: xemacs.info,  Node: Interactive Rebinding,  Next: Programmatic Rebinding,  Up: Rebinding
  964.  
  965. Changing Key Bindings Interactively
  966. ...................................
  967.  
  968. `M-x global-set-key <RET> KEY CMD <RET>'
  969.      Defines KEY globally to run CMD.
  970.  
  971. `M-x local-set-key <RET> KEYS CMD <RET>'
  972.      Defines KEY locally (in the major mode now in effect) to run CMD.
  973.  
  974. `M-x local-unset-key <RET> KEYS <RET>'
  975.      Removes the local binding of KEY.
  976.  
  977.    CMD is a symbol naming an interactively-callable function.
  978.  
  979.    When called interactively, KEY is the next complete key sequence
  980. that you type.  When called as a function, KEY is a string, a vector of
  981. events, or a vector of key-description lists as described in the
  982. `define-key' function description.  The binding goes in the current
  983. buffer's local map, which is shared with other buffers in the same
  984. major mode.
  985.  
  986.    The following example:
  987.  
  988.      M-x global-set-key <RET> C-f next-line <RET>
  989.  
  990. redefines `C-f' to move down a line.  The fact that CMD is read second
  991. makes it serve as a kind of confirmation for KEY.
  992.  
  993.    These functions offer no way to specify a particular prefix keymap as
  994. the one to redefine in, but that is not necessary, as you can include
  995. prefixes in KEY.  KEY is read by reading characters one by one until
  996. they amount to a complete key (that is, not a prefix key).  Thus, if
  997. you type `C-f' for KEY, Emacs enters the minibuffer immediately to read
  998. CMD.  But if you type `C-x', another character is read; if that
  999. character is `4', another character is read, and so on.  For example,
  1000.  
  1001.      M-x global-set-key <RET> C-x 4 $ spell-other-window <RET>
  1002.  
  1003. redefines `C-x 4 $' to run the (fictitious) command
  1004. `spell-other-window'.
  1005.  
  1006.    The most general way to modify a keymap is the function
  1007. `define-key', used in Lisp code (such as your `.emacs' file).
  1008. `define-key' takes three arguments: the keymap, the key to modify in
  1009. it, and the new definition.  *Note Init File::, for an example.
  1010. `substitute-key-definition' is used similarly; it takes three
  1011. arguments, an old definition, a new definition, and a keymap, and
  1012. redefines in that keymap all keys that were previously defined with the
  1013. old definition to have the new definition instead.
  1014.  
  1015. 
  1016. File: xemacs.info,  Node: Programmatic Rebinding,  Next: Key Bindings Using Strings,  Prev: Interactive Rebinding,  Up: Rebinding
  1017.  
  1018. Changing Key Bindings Programmatically
  1019. ......................................
  1020.  
  1021.    You can use the functions `global-set-key' and `define-key' to
  1022. rebind keys under program control.
  1023.  
  1024. ``(global-set-key KEYS CMD)''
  1025.      Defines KEYS globally to run CMD.
  1026.  
  1027. ``(define-key KEYMAP KEYS DEF)''
  1028.      Defines KEYS to run DEF in the keymap KEYMAP.
  1029.  
  1030.    KEYMAP is a keymap object.
  1031.  
  1032.    KEYS is the sequence of keystrokes to bind.
  1033.  
  1034.    DEF is anything that can be a key's definition:
  1035.  
  1036.    * `nil', meaning key is undefined in this keymap
  1037.  
  1038.    * A command, that is, a Lisp function suitable for interactive
  1039.      calling
  1040.  
  1041.    * A string or key sequence vector, which is treated as a keyboard
  1042.      macro
  1043.  
  1044.    * A keymap to define a prefix key
  1045.  
  1046.    * A symbol so that when the key is looked up, the symbol stands for
  1047.      its function definition, which should at that time be one of the
  1048.      above, or another symbol whose function definition is used, and so
  1049.      on
  1050.  
  1051.    * A cons, `(string . defn)', meaning that DEFN is the definition
  1052.      (DEFN should be a valid definition in its own right)
  1053.  
  1054.    * A cons, `(keymap . char)', meaning use the definition of CHAR in
  1055.      map KEYMAP
  1056.  
  1057.    For backward compatibility, XEmacs allows you to specify key
  1058. sequences as strings.  However, the preferred method is to use the
  1059. representations of key sequences as vectors of keystrokes.  *Note
  1060. Keystrokes::, for more information about the rules for constructing key
  1061. sequences.
  1062.  
  1063.    Emacs allows you to abbreviate representations for key sequences in
  1064. most places where there is no ambiguity.  Here are some rules for
  1065. abbreviation:
  1066.  
  1067.    * The keysym by itself is equivalent to a list of just that keysym,
  1068.      i.e., `f1' is equivalent to `(f1)'.
  1069.  
  1070.    * A keystroke by itself is equivalent to a vector containing just
  1071.      that keystroke, i.e.,  `(control a)' is equivalent to `[(control
  1072.      a)]'.
  1073.  
  1074.    * You can use ASCII codes for keysyms that have them. i.e., `65' is
  1075.      equivalent to `A'. (This is not so much an abbreviation as an
  1076.      alternate representation.)
  1077.  
  1078.    Here are some examples of programmatically binding keys:
  1079.  
  1080.  
  1081.      ;;;  Bind `my-command' to <f1>
  1082.      (global-set-key 'f1 'my-command)
  1083.      
  1084.      ;;;  Bind `my-command' to Shift-f1
  1085.      (global-set-key '(shift f1) 'my-command)
  1086.      
  1087.      ;;; Bind `my-command' to C-c Shift-f1
  1088.      (global-set-key '[(control c) (shift f1)] 'my-command)
  1089.      
  1090.      ;;; Bind `my-command' to the middle mouse button.
  1091.      (global-set-key 'button2 'my-command)
  1092.      
  1093.      ;;; Bind `my-command' to <META> <CTL> <Right Mouse Button>
  1094.      ;;; in the keymap that is in force when you are running `dired'.
  1095.      (define-key dired-mode-map '(meta control button3) 'my-command)
  1096.  
  1097. 
  1098. File: xemacs.info,  Node: Key Bindings Using Strings,  Prev: Programmatic Rebinding,  Up: Rebinding
  1099.  
  1100. Using Strings for Changing Key Bindings
  1101. .......................................
  1102.  
  1103.    For backward compatibility, you can still use strings to represent
  1104. key sequences.  Thus you can use commands like the following:
  1105.  
  1106.      ;;; Bind `end-of-line' to C-f
  1107.      (global-set-key "\C-f" 'end-of-line)
  1108.  
  1109.    Note, however, that in some cases you may be binding more than one
  1110. key sequence by using a single command.  This situation can arise
  1111. because in ASCII, `C-i' and <TAB> have the same representation.
  1112. Therefore, when Emacs sees:
  1113.  
  1114.      (global-set-key "\C-i" 'end-of-line)
  1115.  
  1116.    it is unclear whether the user intended to bind `C-i' or <TAB>.  The
  1117. solution XEmacs adopts is to bind both of these key sequences.
  1118.  
  1119.    After binding a command to two key sequences with a form like:
  1120.  
  1121.          (define-key global-map "\^X\^I" 'command-1)
  1122.  
  1123.    it is possible to redefine only one of those sequences like so:
  1124.  
  1125.          (define-key global-map [(control x) (control i)] 'command-2)
  1126.          (define-key global-map [(control x) tab] 'command-3)
  1127.  
  1128.    This applies only when running under a window system.  If you are
  1129. talking to Emacs through an ASCII-only channel, you do not get any of
  1130. these features.
  1131.  
  1132.    Here is a table of pairs of key sequences that behave in a similar
  1133. fashion:
  1134.  
  1135.              control h      backspace
  1136.              control l      clear
  1137.              control i      tab
  1138.              control m      return
  1139.              control j      linefeed
  1140.              control [      escape
  1141.              control @      control space
  1142.  
  1143. 
  1144. File: xemacs.info,  Node: Disabling,  Prev: Rebinding,  Up: Key Bindings
  1145.  
  1146. Disabling Commands
  1147. ------------------
  1148.  
  1149.    Disabling a command marks it as requiring confirmation before it can
  1150. be executed.  The purpose of disabling a command is to prevent
  1151. beginning users from executing it by accident and being confused.
  1152.  
  1153.    The direct mechanism for disabling a command is to have a non-`nil'
  1154. `disabled' property on the Lisp symbol for the command.  These
  1155. properties are normally set by the user's `.emacs' file with Lisp
  1156. expressions such as:
  1157.  
  1158.      (put 'delete-region 'disabled t)
  1159.  
  1160.    If the value of the `disabled' property is a string, that string is
  1161. included in the message printed when the command is used:
  1162.  
  1163.      (put 'delete-region 'disabled
  1164.           "Text deleted this way cannot be yanked back!\n")
  1165.  
  1166.    You can disable a command either by editing the `.emacs' file
  1167. directly or with the command `M-x disable-command', which edits the
  1168. `.emacs' file for you.  *Note Init File::.
  1169.  
  1170.    When you attempt to invoke a disabled command interactively in Emacs,
  1171. a window is displayed containing the command's name, its documentation,
  1172. and some instructions on what to do next; then Emacs asks for input
  1173. saying whether to execute the command as requested, enable it and
  1174. execute, or cancel it.  If you decide to enable the command, you are
  1175. asked whether to do this permanently or just for the current session.
  1176. Enabling permanently works by automatically editing your `.emacs' file.
  1177. You can use `M-x enable-command' at any time to enable any command
  1178. permanently.
  1179.  
  1180.    Whether a command is disabled is independent of what key is used to
  1181. invoke it; it also applies if the command is invoked using `M-x'.
  1182. Disabling a command has no effect on calling it as a function from Lisp
  1183. programs.
  1184.  
  1185. 
  1186. File: xemacs.info,  Node: Syntax,  Next: Init File,  Prev: Key Bindings,  Up: Customization
  1187.  
  1188. The Syntax Table
  1189. ================
  1190.  
  1191.    All the Emacs commands which parse words or balance parentheses are
  1192. controlled by the "syntax table".  The syntax table specifies which
  1193. characters are opening delimiters, which are parts of words, which are
  1194. string quotes, and so on.  Actually, each major mode has its own syntax
  1195. table (though sometimes related major modes use the same one) which it
  1196. installs in each buffer that uses that major mode.  The syntax table
  1197. installed in the current buffer is the one that all commands use, so we
  1198. call it "the" syntax table.  A syntax table is a Lisp object, a vector
  1199. of length 256 whose elements are numbers.
  1200.  
  1201. * Menu:
  1202.  
  1203. * Entry: Syntax Entry.    What the syntax table records for each character.
  1204. * Change: Syntax Change.  How to change the information.
  1205.  
  1206.